<%@page import="java.util.ArrayList"%>
<%@page import="com.entity.Student"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.LinkedHashMap"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%String userName = (String) session.getAttribute("userName");%>

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link rel="stylesheet" href="<%=request.getContextPath()%>/bootstrap/4.1.3/css/bootstrap.min.css">
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-3.3.1.slim.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/popper.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<style type="text/css">

</style>
<script type="text/javascript">
	$(function(){
		$(".second-menu").on("click",function(e){
			console.log(e);
			var btn = e.currentTarget;
			$("iframe").attr("src",$(btn).data("src"));
			$(".second-menu").css("background-color","");
			$(".second-menu").removeClass("active");
			$(btn).addClass("active");
			$(btn).css("background-color","#007bffaa")
		});
		
		$("#main").on("load",function (e) {
		    var height = $(e.currentTarget).contents().find("body")[0].scrollHeight ;
		    $(e.currentTarget).height(height);
		    $(e.currentTarget).parent().height(height);
			$(e.currentTarget).parent().parent().height(height);
		});  
	});

	
</script>
<title>信息列表</title>
</head>

<body >
	
	<div class="card" >
		<div class="card-header text-white" >
			<div class="d-inline-flex">
			<div id="demo" class="carousel slide float-left" data-ride="carousel">
			  <!-- 指示符 -->
			  <ul class="carousel-indicators">
			    <li data-target="#demo" data-slide-to="0" class="active"></li>
			    <li data-target="#demo" data-slide-to="1"></li>
			    <li data-target="#demo" data-slide-to="2"></li>
			  </ul>
			 
			  <!-- 轮播图片 -->
			  <div class="carousel-inner">
			    <div class="carousel-item active">
			      <img src="image/1.jpg" class="img-fluid rounded" style="height: 130px;width: auto">
			      <div class="carousel-caption">
			        <h3>白云</h3>
			        <p>天上飘着多多白云</p>
			      </div>
			    </div>
			    <div class="carousel-item">
			      <img src="image/2.jpg" class="img-fluid rounded" style="height: 130px;width: auto">
			      <div class="carousel-caption">
			        <h3>蓝天</h3>
			        <p>蓝天下美丽的草地、森林</p>
			      </div>
			    </div>
			    <div class="carousel-item">
			      <img src="image/3.jpg" class="img-fluid rounded" style="height: 130px;width: auto">
			      <div class="carousel-caption">
			        <h3>草地</h3>
			        <p>黄牛在悠闲的吃草</p>
			      </div>
			    </div>
			  </div>
			 
			  <!-- 左右切换按钮 -->
			  <a class="carousel-control-prev" href="#demo" data-slide="prev">
			    <span class="carousel-control-prev-icon"></span>
			  </a>
			  <a class="carousel-control-next" href="#demo" data-slide="next">
			    <span class="carousel-control-next-icon"></span>
			  </a>
			 
			</div>
			<div class="float-right text-dark " >
				<div class="d-flex flex-column border border-primary ml-1 p-1 rounded" 
					style="width: 80px;">
					<div class="" style="cursor: pointer;" >
						<img class="img-fluid rounded-circle" src="image/girl.jpg" 
							style="box-shadow: 4px 4px 4px #555;" 
							title="<%=userName%>">
						<div class="text-nowrap" title="<%=userName%>"
							style="text-overflow: ellipsis;overflow: hidden;">
							<%=userName%>
						</div>
					</div>
					
					<button type="button" class="btn btn-danger mt-1">退出</button>
				</div>
			</div>
			</div>
		</div>
		<div class="card-body" >
			<div class="container-fluid" >
				<div class="row" >
					<div class="col-2">
						<!-- menu-div 菜单div的id -->
						<div id="menu-div">
							<!-- 学生管理菜单 -->
							<div class="card">
								<!-- 学生管理一级菜单 -->
								<div class="card-header bg-primary p-1 ">
									<a	class="card-link btn btn-block  text-left text-white font-weight-bold"
										data-toggle="collapse" href="#std-menu-div"> 学生管理 </a>
								</div>
								<!-- 学生管理下的二级菜单 -->
								<div id="std-menu-div" class="collapse show"
									data-parent="#menu-div">
									<div class="card-body p-0 w-100 btn-group-vertical ">
										<button class="second-menu btn btn-outline-primary  pl-2"
											type="button" data-src="student/student_list.jsp">
											学生基本信息</button>
										<button class="second-menu btn btn-outline-primary pl-2"
											type="button" data-src="student/student_chart.jsp">
											学生信息统计</button>
									</div>
								</div>
							</div>
							<!-- 课程管理菜单 -->
							<div class="card">
								<div class="card-header bg-primary p-1">
									<a class="card-link btn btn-block  text-left text-white font-weight-bold"
										data-toggle="collapse" href="#course-menu-div"> 课程管理 </a>
								</div>
								<div id="course-menu-div" class="collapse "
									data-parent="#menu-div">
									<div class="card-body p-0 w-100 btn-group-vertical ">
										<button class="second-menu btn btn-outline-primary  pl-2"
											type="button" data-src="student/student_list.jsp">
											学生基本信息</button>
										<button class="second-menu btn btn-outline-primary pl-2"
											type="button" data-src="student/student_chart.jsp">
											学生信息统计</button>
									</div>
								</div>
							</div>
							<!-- 系统管理菜单 -->
							<div class="card">
								<div class="card-header bg-primary p-1">
									<a class="card-link btn btn-block  text-left text-white font-weight-bold"
										data-toggle="collapse" href="#system-menu-div"> 系统管理 </a>
								</div>
								<div id="system-menu-div" class="collapse"
									data-parent="#menu-div">
									<div class="card-body p-0 w-100 btn-group-vertical ">
										<button class="second-menu btn btn-outline-primary  pl-2"
											type="button" data-src="system/student_list.jsp">
											学生基本信息</button>
										<button class="second-menu btn btn-outline-primary pl-2"
											type="button" data-src="system/student_chart.jsp">
											学生信息统计</button>
									</div>
								</div>
							</div>

						</div>
					</div>
					<div class="col-10">
						<iframe id="main" class="card" src="welcome.jsp" height="100px" width="100%"></iframe>
					</div>
						
				</div>
			</div>
		</div>
					
		<div class="card-footer bg-info text-center">
			<p class="mt-2 mb-2 text-white">&copy; 2020-2021</p>
		</div>
		
	</div>

</body>
</html>